// space-buccaneer
//
// engine.h

#ifndef __ENGINE_H__
#define __ENGINE_H__

//includes
#include <SFML/Graphics.hpp>
#include <vector>

class CGameState;

// start class CGameEngine
class CGameEngine
{
public:

    void Init(const char* title, int width=800, int height=600, int bpp=0, bool fullscreen=false);
    void Cleanup();

    void ChangeState(CGameState* state);
    void PushState(CGameState* state);
    void PopState();

    void HandleEvents();
    void Update();
    void Draw();

    bool Running() { return m_running; }
    void Quit() { m_running = false; }

    sf::RenderWindow* App;

private:
    // the stack of states
    std::vector<CGameState*> states;

    bool m_running;
    bool m_fullscreen;
}; // end class CGameEngine

#endif
